package net.wanho.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * <p>
 * 员工表
 * </p>
 *
 * @author 汤小洋
 * @since 2023-09-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_emp")
@ApiModel(value="Emp对象", description="员工表")
public class Emp implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "工资")
    private Double salary;

    @ApiModelProperty(value = "部门编号")
    private Integer deptId;

    @ApiModelProperty(value = "部门")
    @TableField(exist = false) // 该字段不是数据库表字段，但是又是必须的，所以需要加上这个注解
    private Dept dept;

}
